home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-11
/
gets52.zip
/
GSSKDEMO.PRG
< prev
next >
Wrap
Text File
|
1993-03-27
|
1KB
|
57 lines
/*
GSSKDEMO.PRG
------------
Steve Kolterman [76320,37]
Test GETSYSSK.PRG.
Exiting from GET...
1- jumps to GET 3;
2- sets READ time out to 5 seconds instead of 0.
3- does nothing.
4- sets READ time out to 0 seconds instead of 5.
5- jumps to GET 2.
*/
#include "getexit.ch"
#xcomm READ [<sv: SAVE>] [AT POSITION <pos>] [TIMEOUT <tm>] => ;
ReadModal( getlist,[<pos>],[<tm>] ) ;
[; IIF( !<.sv.>, getlist:= {}, ) ]
#define GE_JUMP 10
#define ORDPOS cargo[1]
FUNCTION Test
LOCAL getlist:= {},nX,aGets[5],nRow:= 5
FOR nX:= 1 TO Len(aGets)
aGets[nX]:= nX
@ ++nRow,5 GET aGets[nX]
getlist[nX]:cargo:= {nX}
IIF( nX==1 .or. nX==5, ;
getlist[nX]:postblock:= {|g| GetJump(g)}, )
IIF( nX==2 .or. nX==4, ;
getlist[nX]:postblock:= {|g| NewTimeOut(g)}, )
NEXT
READ AT POSITION 4 TIMEOUT {10,GE_WRITE}
RETURN NIL
FUNCTION GetJump( oGet )
LOCAL nPos:= IIF( oGet:ORDPOS==1,3,2 )
ReadPos( nPos )
oGet:exitstate:= GE_JUMP
RETURN .T.
FUNCTION NewTimeout( oGet )
LOCAL aTime:= IIF(oGet:ORDPOS==2,{5,},{0,})
ReadTimeOut( aTime )
RETURN .T.